<html>
<head>
    <meta charset="UTF-8">
    <title>xtermjs</title>
    <!--<link rel="stylesheet" href="/webjars/xterm/2.9.2/dist/xterm.css" />-->
    <link rel="stylesheet" href="css/xterm.css">
</head>
<body>
    <div style="width:1000px;" id="xterm"></div>
    <!--<script type="application/javascript" src="/webjars/xterm/2.9.2/dist/xterm.js"></script>-->
    <!--<script type="application/javascript" src="/webjars/xterm/2.9.2/dist/addons/attach/attach.js"></script>-->
    <script type="application/javascript" src="js/xterm.js"></script>
    <script type="application/javascript" src="addons/attach/attach.js"></script>

    <script type="application/javascript">
        var term = new Terminal({
            cursorBlink: sessionStorage.getItem('terminalCursorBlink'),
            rows: sessionStorage.getItem('terminalRows'),
            cols: sessionStorage.getItem('terminalCols'),
        });
        term.open(document.getElementById('xterm'));
        let socket = new WebSocket(sessionStorage.getItem('terminalUrl'));
        term.attach(socket);
        term.focus();
    </script>
</body>
</html>
